package com.guomao.service.impl;

import com.guomao.dao.EmployeeMapper;
import com.guomao.entity.Employee;
import com.guomao.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    @Transactional(readOnly = true)
    public List<Employee> queryEmps() {
        System.out.println("EmployeeServiceImpl.queryEmps...");
        List<Employee> employees = employeeMapper.queryAllEmployee();
        return employees;
    }
}